<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@taglib tagdir="/WEB-INF/tags" prefix="koor" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/HTML4/strict.dtd">

<html>
    <head>
        <koor:bootstrap/>
        <meta http-equiv="Content-Type" content="text/html; charset=utf8">
        <script type="text/javascript" src="js/bootstrap-alert.js" ></script> 
        <script type="text/javascript" src="js/jquery.validation.js" ></script> 
        <script type="text/javascript" src="js/form_validate.js">  </script>
        <script type="text/javascript" src="js/jquery-1.7.2.js">  </script>
        <title>Koor :: Добавление курсовой</title>
    </head>
    <body>

        <koor:top/>
        <koor:navtabs number="2"/>

        <div class="span7 offset2 well">

            <div style="margin-bottom: 20px" class="center_title">
                <h2>Добавление курсовой работы</h2>
            </div>

            <form class="form-horizontal" method="POST" action="main?action=courseWork.save">
                <fieldset>
				
				<input type="hidden" id="id" name="id" value="-1">
				
				<input type="hidden" id="student_id" name="student_id" value="${student_id}">
				
				<input type="hidden" id="teacher_id" name="teacher_id" value="${userAuth.user.person.id}">
				
				<div id="themeDiv" class="control-group">
                        <label class="control-label" for="theme">Тема</label>
                        <div class="controls">
                            <input class="span4" type="text" id="theme" name="theme" oninput="fieldIsFilling(this)">
                            <span class="help-inline" ></span>
                        </div>
                    </div>

                    <div id="directionDiv" class="control-group">
                        <label class="control-label" for="direction">Направление</label>
                        <div class="controls">
                            <input class="span4" type="text" id="direction" name="direction" oninput="fieldIsFilling(this)">
                            <span class="help-inline" ></span>
                        </div>
                    </div>
					
					<div id="subjectDiv" class="control-group">
                            <label class="control-label" for="subject_id">Предмет</label> 
                            <div class="controls">
                                <select id="subject_id" name="subject_id">
								<c:if test="${!subjects.isEmpty()}">
									<c:forEach var="subject" items="${subjects}">
										<option value="${subject.id}"><c:out value="${subject.title}"/></option>
									</c:forEach>
								</c:if>
                                </select>
                            </div>
                    </div>

                </fieldset>
                <div class="center_title">
                    <input class="btn btn-primary" type="submit" name="saveButton" value="Добавить">
                    <a href="main?action=courseWork.list" class="btn" name="cancelButton">Отменить</a>
                </div>

            </form>

        </div>
    </body>
</html>
